package com.athuahua.es.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

/**
 * @Author: huahua
 * @Date: 2024/10/2 0002
 * @Time: 21:35
 * @Description:
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class OrderInfo implements Serializable {
    @JsonProperty("order_no")
    private String orderNo;

    @JsonProperty("order_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date orderTime;

    @JsonProperty("good_info")
    private List<GoodInfo> goodInfo;

    @JsonProperty("buyer")
    private String buyer;

    @JsonProperty("phone")
    private String phone;


    @Data
    @AllArgsConstructor
    public static class GoodInfo implements Serializable {

        @JsonProperty("good_price")
        private Double goodPrice;

        @JsonProperty("good_name")
        private String goodName;

        @JsonProperty("good_count")
        private Integer goodCount;
    }

}
